import os
basedir = os.path.abspath(os.path.dirname(__file__))


class Config:
    FLASKY_COMMENTS_PER_PAGE = 30


class Prodconfig(Config):
    pass


class Devconfig(Config):
    SECRET_KEY = os.environ.get('SECRET_KEY') or 'hard to guess string'
    SQLALCHEMY_DATABASE_URI = 'postgresql://postgres:13931951746luobo@localhost/flaskblog'
    SQLALCHEMY_TRACK_MODIFICATIONS = True
    FLASKY_ADMIN = '1204920733@qq.com'
    MAIL_SERVER = 'smtp.exmail.qq.com'
    MAIL_PORT = 465
    MAIL_USE_SSL = True
    MAIL_USERNAME = '123@liusenblog.com'
    MAIL_PASSWORD = 'R3CUyJi3wTWDgyuw'
    FLASKY_POSTS_PER_PAGE = 10
    FLASKY_FOLLOWERS_PER_PAGE = 50
    FLASKY_COMMENTS_PER_PAGE = 30


config = {
    'dev': Devconfig,
    'prod': Prodconfig
}